import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/demo',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('@/views/DemoView.vue'),
    },
    //=====================会员登录
    {
      path: '/mumberAdd',
      component: () => import('@/views/Quanyi/MumberRightAdd.vue'),
    },
    {
      path: '/mumberlist',
      component: () => import('@/views/Quanyi/MumberRightlist.vue'),
    },
    //===============会员等级==================
    {
      path: '/memberlevadd',
      component: () => import('@/views/member/MemberlevAdd.vue'),
    },
    {
      path: '/memberlevelList',
      component: () => import('@/views/member/MemberLevelList.vue'),
    },
    {
      path: '/MemberUpdate',
      component: () => import('@/views/member/MemberLevelUpdate.vue'),
    },
    //=============会员================
    {
      path: '/memberadd',
      component: () => import('@/views/member/MemberAdd.vue'),
    },
    {
      path: '/memberlist',
      component: () => import('@/views/member/Memberlist.vue'),
    },
    {
      path: '/memberupdates',
      component: () => import('@/views/member/Memberupdate.vue'),
    },
    //====================门店==========================
    {
      path: '/shopadd',
      component: () => import('@/views/Shop/ShopAdd.vue'),
    },
    {
      path: '/shoplist',
      component: () => import('@/views/Shop/Shoplist.vue'),
    },
    {
      path: '/shopupdate',
      component: () => import('@/views/Shop/ShopUpdate.vue'),
    },
    {
      path: '/shopdeteil',
      component: () => import('@/views/Shop/Shopdetail.vue'),
    },
    {
      path: '/shopcount',
      component: () => import('@/views/Shop/ShopCount.vue'),
    },
    //==================优惠券===========================
    {
      path: '/discountadd',
      component: () => import('@/views/DisCount/DisCountAdd.vue'),
    },
    {
      path: '/discountlist',
      component: () => import('@/views/DisCount/DisCountlist.vue'),
    },
    {
      path: '/disupdate',
      component: () => import('@/views/DisCount/DisUpdate.vue'),
    },
    //=================== 房型=======================
    {
      path: '/houseadd',
      component: () => import('@/views/House/HouseAdd.vue'),
    },
    {
      path: '/houselist',
      component: () => import('@/views/House/Houselist.vue'),
    },
    {
      path: '/houseupdate',
      component: () => import('@/views/House/HouseUpdate.vue'),
    },
    //=====================房号====================
    {
      path: '/housenumberadd',
      component: () => import('@/views/House/HouseNumberAdd.vue'),
    },
    {
      path: '/HouseNumberlist',
      component: () => import('@/views/House/HouseNumberlist.vue'),
    },
  ],
})

export default router
